#include "board_hardware_config.h"
#include "app_procotol_sendcmd.h"
#include "app_procotol.h"
#include "version.h"

void proctol_send_readversion()
{
       unsigned int ret;
       unsigned char buffer[12]={0};
      buffer[0] = SOFTWAREVER;
	buffer[1] = m_date_year;
	buffer[2] = m_date_mouth;
	
       buffer[3] = m_date_day;
      
	procotol_txpacket(CMD_READVERSION,buffer,4);
}

void procotol_enter_iapmode()
{
       unsigned int ret;
       unsigned char buffer[12]={0};
      buffer[0] = 0x01;
	procotol_txpacket(CMD_IN_IAPMODE,buffer,1);
}


void procotol_senddeviceconnect()
{
       unsigned char buffer[12]={0};
      buffer[0] = 0x11;
      buffer[1] = 0x22;
      buffer[2] = 0x33;
      buffer[3] = 0x44;
      
	procotol_txpacket(CMD_DEVICECONNECT,buffer,4);
}


void procotol_senddevicename()
{
       unsigned char buffer[12]={0};
      strcpy(buffer,"aabbccdd");
	procotol_txpacket(CMD_READDEVICENAME,buffer,8);
}

void procotol_senddeviceinfo()
{
    unsigned int ret;
       unsigned char buffer[12]={0};
      buffer[0] = 1;
      buffer[1] = 2;
      buffer[2] = 3;
      buffer[3] = 4;
       buffer[4] = 5;
      buffer[5] = 6;
      
	procotol_txpacket(CMD_READPARAINFO,buffer,6);
}
